package homework01;

public class Test01 {
    public static void main(String[] args) {
        Circle circle01 = new Circle(1.0,2.0,2.0);
        Circle circle02 = new Circle(2.0, 2.0, 2.0);

        System.out.println(circle01.toString());
        System.out.println(circle02.toString());

        Rectangle rectangle01 = new Rectangle(3.0, 4.0, 5.0, 6.0);
        Rectangle rectangle02 = new Rectangle(3.0, 4.0, 5.0, 6.0);
        System.out.println(rectangle01.toString());
        System.out.println(rectangle02.toString());

        System.out.println(circle01.equals(circle02));
        System.out.println(circle01.equals(rectangle01));
        System.out.println(rectangle01.equals(rectangle02));

        circle02.setRadius(3.0);
        rectangle02.setWidth(4.0);
        System.out.println(circle01.equals(circle02)); // 输出：false
        System.out.println(rectangle01.equals(rectangle02)); // 输出：false

    }
}
